<template>
	<view class="container">
		<cu-header bgColor="bg-gradual-blue" :isBack="true">
			<block slot="content" class="page-name">创建地址</block>
		</cu-header>
		<view class="contents">
			<cu-input title="收货人"></cu-input>
			<cu-input title="手机号码" mold="phone"></cu-input>
			<cu-input title="选择地区" mold="right" @onselect="onSelectRegion"></cu-input>
			<cu-input title="详细地址" mold="right" @onselect="onSelectAddress"></cu-input>
			<view class="flex flex-wrap padding">
				<button @click="onSave" class="cu-btn round bg-orange flex-sub">保存</button>
			</view>
		</view>
		<cu-more title="已没有更多内容咯"></cu-more>
	</view>
</template>

<script>
	import {
		mapState,
		mapMutations
	} from 'vuex';
	import cuInput from "@/components/diy/from/cu-input.vue";
	export default {
		computed: {
			...mapState(['hasLogin', 'forcedLogin', 'userinfo'])
		},
		components: {
			cuInput
		},
		data() {
			return {

			};
		},
		/**
		 * 用户点击右上角分享
		 */
		onShareAppMessage: function(res) {
			if (res.from === 'button') {
				// 来自页面内分享按钮
				console.log(res.target);
			}
			return this.shareinfo;
		},
		onLoad() {},
		onShow() {
			
		},
		methods: {
			...mapMutations(['']),
			onSave:function(e){
				console.log(e);
				uni.navigateBack({
					delta:1
				})
			},
			onSelectRegion:function(e){
				console.log(e);
			},
			onSelectAddress:function(e){
				console.log(e);
			}

		}
	};
</script>

<style scoped></style>
